package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by admin on 2017-07-26.
 */

public class CancleOrderApi extends BaseApi {
    CancleOrderReq req;
    public CancleOrderApi(String member_id, String order_id, String record_id){
        req=new CancleOrderReq(member_id,order_id,record_id);
    }
    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).cancleOrder(requestBody);
    }
    private class CancleOrderReq{
        private String member_id;
        private String order_id;
        private String record_id;

        public CancleOrderReq(String member_id, String order_id, String record_id) {
            super();
            this.member_id = member_id;
            this.order_id = order_id;
            this.record_id = record_id;
        }


    }
}
